/* ------------------- COOKIE RELATED ---------------------- */
var bikky = document.cookie; 
function getCookie(name) { 
	var index = bikky.indexOf(name + "="); 
	if (index == -1) return null; 
	index = bikky.indexOf("=", index) + 1; 
	var endstr = bikky.indexOf(";", index); 
	if (endstr == -1) endstr = bikky.length; 
	return unescape(bikky.substring(index, endstr)); 
}

var today = new Date(); 
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000); // plus 28 days

function setCookie(name, value, path) { 
    var the_cookie = name + "=" + escape(value) + ";" ;
    
    if(path){
        var the_cookie = the_cookie + "path="+path+";";
    }
    
    var the_cookie = the_cookie + "expires=" + expiry.toGMTString();
	document.cookie=the_cookie; 
	
	bikky= document.cookie;
}
/* ----------------- END COOKIES ------------------------ */